cmake_minimum_required(VERSION 2.8)
project( SimulatedAnnealing )

find_package(OpenCV REQUIRED)

include_directories ("${PROJECT_SOURCE_DIR}/features")
add_subdirectory(features)
include_directories ("${PROJECT_SOURCE_DIR}/bivgauss")
add_subdirectory(bivgauss)
include_directories ("${PROJECT_SOURCE_DIR}/multinorm")
add_subdirectory(multinorm)

add_executable( test test.cpp sa.cpp constraintSet.cpp constraint.cpp )
add_executable( genCharacters genCharacters.cpp sa.cpp constraintSet.cpp constraint.cpp )
add_executable( genRandom genRandom.cpp )
add_executable( genFeatures genFeatures.cpp )
add_executable( genNewData genNewData.cpp sa.cpp constraintSet.cpp constraint.cpp)
add_executable( view viewThresholded.cpp )
add_executable( testMN testMN.cpp )

target_link_libraries( test features bivgauss multinorm ${OpenCV_LIBS})
target_link_libraries( genCharacters features bivgauss multinorm ${OpenCV_LIBS})
target_link_libraries( genRandom features bivgauss multinorm ${OpenCV_LIBS})
target_link_libraries( genFeatures features bivgauss multinorm ${OpenCV_LIBS})
target_link_libraries( genNewData features bivgauss multinorm ${OpenCV_LIBS})
target_link_libraries( testMN features multinorm ${OpenCV_LIBS})
target_link_libraries( view ${OpenCV_LIBS})

set(CMAKE_CXX_FLAGS "-O3 -Wall -Wextra -fopenmp")
#set(CMAKE_CXX_FLAGS "-g -pg -Wall -Wextra")
